package com.yyl.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yyl.service.ITabStudentService;
import com.yyl.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 于永利
 * @since 2024-07-20
 */
@RestController
@RequestMapping("tab_student")
public class TabStudentController {
    @Autowired
    ITabStudentService tabStudentService;
    // 查询所有的学生以及学生所在的班级的信息
    @GetMapping
    public Result findAll(){
      return Result.success(tabStudentService.findAll());
    }
    @GetMapping("fenye")
    public Result fenye(Integer curr,Integer size){
        IPage page = new Page(curr,size);
        Page mypage =  tabStudentService.findAll1(page);
        return Result.success(mypage);
    }
}

